<%--
  Created by IntelliJ IDEA.
  User: yinshankun
  Date: 2020/11/6
  Time: 16:14
  To change this template use File | Settings | File Templates.尹山坤
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%String path = request.getContextPath();%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<script src="<%=path%>/ysk/js/jquery-3.5.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<html>
<head>
    <style type="text/css">
    #poent{
        width: 600px;
        margin: 0 auto;
        height: 50px;


    }
        #poent1{
            width: 30px;
            height: 30px;

        }
        #poent2{
            width: 300px;
            height: 40px;

        }
        #poent3{
            float: left;
            margin-left: 150px;

        }
    #poent4{
        float: left;
        margin-top: 5px;
    }
        #poent5{
            width: 600px;
            margin: 0 auto;
            height: 60%;


        }
        #poent6{
            width: 600px;
            margin: 0 auto;
            height: 50px;


        }
        #poent7{
         text-align: center;
        }
        #poent8{

            width: 180px;
            height: 50px;
            line-height: 70px;
            margin-left: 10px;
            float: left;
            font-size: 20px;

        }
        #poent9{

            width: 60px;
            height: 50px;

        }
        #poent10{
            text-decoration: none;
            font-size: 30px;
        }
        #poent11{
            width: 30px;
            height: 20px;
            float: left;
        }
        #poent12{
            width: 580px;
            height: 70px;
            background-image: url("<%=path%>/ysk/images/bgy.jpg");
        }
    </style>
    <title>零件名</title>
</head>
<body>
<div id="poent">
    <div id="poent3">
    <input id="poent2" placeholder="请输入要查询的零件名" type="text">

    </div>
    <div id="poent4"><a href="#"><img id="poent1" src="<%=path%>/ysk/images/sousuo.jpg"></a></div>

</div>
<div id="poent5">
    <c:forEach items="${requestScope.components.list}" var="components">
    <div id="poent12">
        <div id="poent8">零件名：${components.componentName}</div>
<div id="poent8"><a href="#"><img id="poent9"  src="<%=path%>/ysk/images/${components.pic}"></a></div>
        <div id="poent8">价格:${components.price}</div>
        <div><input id="poent11" type="hidden" value="${components.id}"></div>
    </div>
       
    </c:forEach>



</div>




<div id="poent6">

    <div id="poent7">
       <c:forEach begin="1" end="${requestScope.components.pages}" var="i">
           <c:if test="${i eq param.PageNum}">
               <span id="poent10" style="color: red">[${i}]</span>
           </c:if>
           <c:if test="${i ne param.PageNum}">
               <a id="poent10" href="<%=path%>/component?PageNum=${i}">[${i}]</a>
           </c:if>


       </c:forEach>
    </div>
</div>

</body>
</html>
<script type="text/javascript">
$(function () {

})



</script>